package javacode.chapter06.多态;

public class Person {
    String name;

    public void work(){
        System.out.println("人正在工作！");
    }
}

class Student extends Person{
    public void work(){
        System.out.println("学生正在学习！");
    }
}

class Teacher extends Person{
    @Override
    public void work() {
        System.out.println("教师正在授课！");
    }
}
